package geant;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.awt.TextField;
import java.awt.image.BufferedImage;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class PanelImagen extends JPanel { 
	
	    public ImageIcon imag;
	    Dimension dim;
	    PanelImagen(){
	    	this.setSize(700,400);
	    }
	    
	    public void paintComponent(Graphics g){
	    	try {
	    		dim = getSize();
	    		imag = new ImageIcon(new ImageIcon(getClass().getResource("/geant/geant_fondo.jpg")).getImage());
	    		
	    		g.drawImage(imag.getImage(), 0,0,dim.width,dim.height,null);
	    		setOpaque(false);
	    		
	    		super.paintComponent(g);
	    		
			} catch (Exception e) {
				System.out.println("no ta la ginda");
			}
	    }
}
